# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=uptux
pkgver=33.85ccfd0
pkgrel=5
pkgdesc='Linux privilege escalation checks (systemd, dbus, socket fun, etc).'
groups=('blackarch' 'blackarch-scanner')
arch=('any')
url='https://github.com/initstring/uptux'
license=('MIT')
depends=('python')
makedepends=('git')
source=("git+https://github.com/initstring/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 755 -t "$pkgdir/usr/share/$pkgname/" tests/*.sh
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

